'use strict';
define(function(require, exports, module) {

    // app.directive('player', function() {
    //     return {
    //         'restrict': 'E',
    //         'replace': true,
    //         templateUrl: "tpl/player.html",
    //         link: function(scope, element, attrs) {

    //         }
    //     };
    // });



    exports.init = function(app) {
        console.info("load app-header...");

        app.register.directive("appHeader", function() {
            return {
                'restrict': 'E',
                'replace': false,
                templateUrl: "common/directive/app-header/view/app-header.html",
                controller: function($scope, $element, navService) {
                    var headerNavItems = [];
                    var allItems = $scope.AllNavItems;

                    angular.forEach(allItems, function(item){
                        if(item.state.indexOf(".") == -1 && !item['hidden']){
                            headerNavItems.push(item);
                        }
                    });
                    $scope.headerNavItems = headerNavItems;
                }
            };
        });



    };

});